package com.yc.bran.snack.bean;

public class GoodsInfo {

	private Integer gid;
	private Integer tid;
	private String gname;
	private Double gprice;
	private String ginfo;
	private Integer gblance;
	private Double gweight;
	private String gpic;
	private Integer gstatus;
	
	public Integer getGid() {
		return gid;
	}
	public void setGid(Integer gid) {
		this.gid = gid;
	}
	public Integer getTid() {
		return tid;
	}
	public void setTid(Integer tid) {
		this.tid = tid;
	}
	public String getGname() {
		return gname;
	}
	public void setGname(String gname) {
		this.gname = gname;
	}
	public Double getGprice() {
		return gprice;
	}
	public void setGprice(Double gprice) {
		this.gprice = gprice;
	}
	public String getGinfo() {
		return ginfo;
	}
	public void setGinfo(String ginfo) {
		this.ginfo = ginfo;
	}
	public Integer getGblance() {
		return gblance;
	}
	public void setGblance(Integer gblance) {
		this.gblance = gblance;
	}
	public Double getGweight() {
		return gweight;
	}
	public void setGweight(Double gweight) {
		this.gweight = gweight;
	}
	public String getGpic() {
		return gpic;
	}
	public void setGpic(String gpic) {
		this.gpic = gpic;
	}
	public Integer getGstatus() {
		return gstatus;
	}
	public void setGstatus(Integer gstatus) {
		this.gstatus = gstatus;
	}
	
	@Override
	public String toString() {
		return "GoodsInfo [gid=" + gid + ", tid=" + tid + ", gname=" + gname + ", gprice=" + gprice + ", ginfo=" + ginfo
				+ ", gblance=" + gblance + ", gweight=" + gweight + ", gpic=" + gpic + ", gstatus=" + gstatus + "]";
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((gblance == null) ? 0 : gblance.hashCode());
		result = prime * result + ((gid == null) ? 0 : gid.hashCode());
		result = prime * result + ((ginfo == null) ? 0 : ginfo.hashCode());
		result = prime * result + ((gname == null) ? 0 : gname.hashCode());
		result = prime * result + ((gpic == null) ? 0 : gpic.hashCode());
		result = prime * result + ((gstatus == null) ? 0 : gstatus.hashCode());
		result = prime * result + ((gweight == null) ? 0 : gweight.hashCode());
		result = prime * result + ((gprice == null) ? 0 : gprice.hashCode());
		result = prime * result + ((tid == null) ? 0 : tid.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		GoodsInfo other = (GoodsInfo) obj;
		if (gblance == null) {
			if (other.gblance != null)
				return false;
		} else if (!gblance.equals(other.gblance))
			return false;
		if (gid == null) {
			if (other.gid != null)
				return false;
		} else if (!gid.equals(other.gid))
			return false;
		if (ginfo == null) {
			if (other.ginfo != null)
				return false;
		} else if (!ginfo.equals(other.ginfo))
			return false;
		if (gname == null) {
			if (other.gname != null)
				return false;
		} else if (!gname.equals(other.gname))
			return false;
		if (gpic == null) {
			if (other.gpic != null)
				return false;
		} else if (!gpic.equals(other.gpic))
			return false;
		if (gstatus == null) {
			if (other.gstatus != null)
				return false;
		} else if (!gstatus.equals(other.gstatus))
			return false;
		if (gweight == null) {
			if (other.gweight != null)
				return false;
		} else if (!gweight.equals(other.gweight))
			return false;
		if (gprice == null) {
			if (other.gprice != null)
				return false;
		} else if (!gprice.equals(other.gprice))
			return false;
		if (tid == null) {
			if (other.tid != null)
				return false;
		} else if (!tid.equals(other.tid))
			return false;
		return true;
	}
}
